How to export the data on to the Second sheet of the EXCEL

Hello All,

I want to export the data onto the second sheet of the EXCEL in DXL.

Assume I am calling the EXCEL and putting the data onto the particular sheet one by one.

Please help me out.

Thanks


KBSri - Wed Apr 16 03:56:14 EDT 2014

Re: How to export the data on to the Second sheet of the EXCEL
PatrickGuay - Wed Apr 23 13:28:45 EDT 2014

Oh the joys of exporting to excel.

 

Here is a snippet:

    OleAutoObj excelGetSheetOLE( OleAutoObj &objExcelWorkbook, int sheetNumber )
    {
 
        OleAutoObj objExcelSheet
 
        clear( args )
        put( args, sheetNumber )
        checkRes( oleGet( objExcelWorkbook, "Sheets", args, objExcelSheet ) )
 
        return objExcelSheet
    }

 


// Somewhere in your method

...

if (dataSheetNumber < 4)
        objSheet = excelGetSheetOLE( objWorkbook, dataSheetNumber )
        else 
        objSheet = excelCreateSheetOLE(objWorkbook, null)